﻿Imports System
Imports System.Text
Imports System.Collections.Generic
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports Microsoft.Data.Schema.UnitTesting
Imports Microsoft.Data.Schema.UnitTesting.Conditions

<TestClass()> _
Public Class Severity
    Inherits DatabaseTestClass

    Sub New()
        InitializeComponent()
    End Sub

    <TestInitialize()> _
    Public Sub TestInitialize()
        InitializeTest()
    End Sub

    <TestCleanup()> _
    Public Sub TestCleanup()
        CleanupTest()
    End Sub

  <TestMethod()> _
  Public Sub UT000006()
    Dim testActions As DatabaseTestActions = Me.UT000006Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub
  <TestMethod()> _
  Public Sub UT000007()
    Dim testActions As DatabaseTestActions = Me.UT000007Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub
  <TestMethod()> _
  Public Sub UT000008()
    Dim testActions As DatabaseTestActions = Me.UT000008Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub
  <TestMethod()> _
  Public Sub UT000009()
    Dim testActions As DatabaseTestActions = Me.UT000009Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub
  <TestMethod()> _
  Public Sub UT000010()
    Dim testActions As DatabaseTestActions = Me.UT000010Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub





#Region "Designer support code"

  'NOTE: The following procedure is required by the Designer
  'It can be modified using the Designer.  
  'Do not modify it using the code editor.
  <System.Diagnostics.DebuggerStepThrough()> _
  Private Sub InitializeComponent()
    Dim UT000006_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Severity))
    Dim UT000006_ScalarValue_Description As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000006_ScalarValue_SortOrder As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000006_ScalarValue_IsActive As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000007_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000007_ScalarValue_Description As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000007_ScalarValue_SortOrder As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000007_ScalarValue_IsActive As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000008_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000008_ScalarValue_Description As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000008_ScalarValue_SortOrder As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000008_ScalarValue_IsActive As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000009_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000009_ScalarValue_Description As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000009_ScalarValue_SortOrder As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000009_ScalarValue_IsActive As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000010_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000010_RowCount As Microsoft.Data.Schema.UnitTesting.Conditions.RowCountCondition
    Me.UT000006Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    Me.UT000007Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    Me.UT000008Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    Me.UT000009Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    Me.UT000010Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    UT000006_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000006_ScalarValue_Description = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000006_ScalarValue_SortOrder = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000006_ScalarValue_IsActive = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000007_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000007_ScalarValue_Description = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000007_ScalarValue_SortOrder = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000007_ScalarValue_IsActive = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000008_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000008_ScalarValue_Description = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000008_ScalarValue_SortOrder = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000008_ScalarValue_IsActive = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000009_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000009_ScalarValue_Description = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000009_ScalarValue_SortOrder = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000009_ScalarValue_IsActive = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000010_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000010_RowCount = New Microsoft.Data.Schema.UnitTesting.Conditions.RowCountCondition
    '
    'UT000006_TestAction
    '
    UT000006_TestAction.Conditions.Add(UT000006_ScalarValue_Description)
    UT000006_TestAction.Conditions.Add(UT000006_ScalarValue_SortOrder)
    UT000006_TestAction.Conditions.Add(UT000006_ScalarValue_IsActive)
    resources.ApplyResources(UT000006_TestAction, "UT000006_TestAction")
    '
    'UT000006_ScalarValue_Description
    '
    UT000006_ScalarValue_Description.ColumnNumber = 1
    UT000006_ScalarValue_Description.Enabled = True
    UT000006_ScalarValue_Description.ExpectedValue = "Critical"
    UT000006_ScalarValue_Description.Name = "UT000006_ScalarValue_Description"
    UT000006_ScalarValue_Description.NullExpected = False
    UT000006_ScalarValue_Description.ResultSet = 1
    UT000006_ScalarValue_Description.RowNumber = 1
    '
    'UT000006_ScalarValue_SortOrder
    '
    UT000006_ScalarValue_SortOrder.ColumnNumber = 2
    UT000006_ScalarValue_SortOrder.Enabled = True
    UT000006_ScalarValue_SortOrder.ExpectedValue = "1"
    UT000006_ScalarValue_SortOrder.Name = "UT000006_ScalarValue_SortOrder"
    UT000006_ScalarValue_SortOrder.NullExpected = False
    UT000006_ScalarValue_SortOrder.ResultSet = 1
    UT000006_ScalarValue_SortOrder.RowNumber = 1
    '
    'UT000006_ScalarValue_IsActive
    '
    UT000006_ScalarValue_IsActive.ColumnNumber = 3
    UT000006_ScalarValue_IsActive.Enabled = True
    UT000006_ScalarValue_IsActive.ExpectedValue = "True"
    UT000006_ScalarValue_IsActive.Name = "UT000006_ScalarValue_IsActive"
    UT000006_ScalarValue_IsActive.NullExpected = False
    UT000006_ScalarValue_IsActive.ResultSet = 1
    UT000006_ScalarValue_IsActive.RowNumber = 1
    '
    'UT000007_TestAction
    '
    UT000007_TestAction.Conditions.Add(UT000007_ScalarValue_Description)
    UT000007_TestAction.Conditions.Add(UT000007_ScalarValue_SortOrder)
    UT000007_TestAction.Conditions.Add(UT000007_ScalarValue_IsActive)
    resources.ApplyResources(UT000007_TestAction, "UT000007_TestAction")
    '
    'UT000007_ScalarValue_Description
    '
    UT000007_ScalarValue_Description.ColumnNumber = 1
    UT000007_ScalarValue_Description.Enabled = True
    UT000007_ScalarValue_Description.ExpectedValue = "Warning"
    UT000007_ScalarValue_Description.Name = "UT000007_ScalarValue_Description"
    UT000007_ScalarValue_Description.NullExpected = False
    UT000007_ScalarValue_Description.ResultSet = 1
    UT000007_ScalarValue_Description.RowNumber = 1
    '
    'UT000007_ScalarValue_SortOrder
    '
    UT000007_ScalarValue_SortOrder.ColumnNumber = 2
    UT000007_ScalarValue_SortOrder.Enabled = True
    UT000007_ScalarValue_SortOrder.ExpectedValue = "2"
    UT000007_ScalarValue_SortOrder.Name = "UT000007_ScalarValue_SortOrder"
    UT000007_ScalarValue_SortOrder.NullExpected = False
    UT000007_ScalarValue_SortOrder.ResultSet = 1
    UT000007_ScalarValue_SortOrder.RowNumber = 1
    '
    'UT000007_ScalarValue_IsActive
    '
    UT000007_ScalarValue_IsActive.ColumnNumber = 3
    UT000007_ScalarValue_IsActive.Enabled = True
    UT000007_ScalarValue_IsActive.ExpectedValue = "True"
    UT000007_ScalarValue_IsActive.Name = "UT000007_ScalarValue_IsActive"
    UT000007_ScalarValue_IsActive.NullExpected = False
    UT000007_ScalarValue_IsActive.ResultSet = 1
    UT000007_ScalarValue_IsActive.RowNumber = 1
    '
    'UT000008_TestAction
    '
    UT000008_TestAction.Conditions.Add(UT000008_ScalarValue_Description)
    UT000008_TestAction.Conditions.Add(UT000008_ScalarValue_SortOrder)
    UT000008_TestAction.Conditions.Add(UT000008_ScalarValue_IsActive)
    resources.ApplyResources(UT000008_TestAction, "UT000008_TestAction")
    '
    'UT000008_ScalarValue_Description
    '
    UT000008_ScalarValue_Description.ColumnNumber = 1
    UT000008_ScalarValue_Description.Enabled = True
    UT000008_ScalarValue_Description.ExpectedValue = "Validation"
    UT000008_ScalarValue_Description.Name = "UT000008_ScalarValue_Description"
    UT000008_ScalarValue_Description.NullExpected = False
    UT000008_ScalarValue_Description.ResultSet = 1
    UT000008_ScalarValue_Description.RowNumber = 1
    '
    'UT000008_ScalarValue_SortOrder
    '
    UT000008_ScalarValue_SortOrder.ColumnNumber = 2
    UT000008_ScalarValue_SortOrder.Enabled = True
    UT000008_ScalarValue_SortOrder.ExpectedValue = "3"
    UT000008_ScalarValue_SortOrder.Name = "UT000008_ScalarValue_SortOrder"
    UT000008_ScalarValue_SortOrder.NullExpected = False
    UT000008_ScalarValue_SortOrder.ResultSet = 1
    UT000008_ScalarValue_SortOrder.RowNumber = 1
    '
    'UT000008_ScalarValue_IsActive
    '
    UT000008_ScalarValue_IsActive.ColumnNumber = 3
    UT000008_ScalarValue_IsActive.Enabled = True
    UT000008_ScalarValue_IsActive.ExpectedValue = "True"
    UT000008_ScalarValue_IsActive.Name = "UT000008_ScalarValue_IsActive"
    UT000008_ScalarValue_IsActive.NullExpected = False
    UT000008_ScalarValue_IsActive.ResultSet = 1
    UT000008_ScalarValue_IsActive.RowNumber = 1
    '
    'UT000009_TestAction
    '
    UT000009_TestAction.Conditions.Add(UT000009_ScalarValue_Description)
    UT000009_TestAction.Conditions.Add(UT000009_ScalarValue_SortOrder)
    UT000009_TestAction.Conditions.Add(UT000009_ScalarValue_IsActive)
    resources.ApplyResources(UT000009_TestAction, "UT000009_TestAction")
    '
    'UT000009_ScalarValue_Description
    '
    UT000009_ScalarValue_Description.ColumnNumber = 1
    UT000009_ScalarValue_Description.Enabled = True
    UT000009_ScalarValue_Description.ExpectedValue = "Information"
    UT000009_ScalarValue_Description.Name = "UT000009_ScalarValue_Description"
    UT000009_ScalarValue_Description.NullExpected = False
    UT000009_ScalarValue_Description.ResultSet = 1
    UT000009_ScalarValue_Description.RowNumber = 1
    '
    'UT000009_ScalarValue_SortOrder
    '
    UT000009_ScalarValue_SortOrder.ColumnNumber = 2
    UT000009_ScalarValue_SortOrder.Enabled = True
    UT000009_ScalarValue_SortOrder.ExpectedValue = "4"
    UT000009_ScalarValue_SortOrder.Name = "UT000009_ScalarValue_SortOrder"
    UT000009_ScalarValue_SortOrder.NullExpected = False
    UT000009_ScalarValue_SortOrder.ResultSet = 1
    UT000009_ScalarValue_SortOrder.RowNumber = 1
    '
    'UT000009_ScalarValue_IsActive
    '
    UT000009_ScalarValue_IsActive.ColumnNumber = 3
    UT000009_ScalarValue_IsActive.Enabled = True
    UT000009_ScalarValue_IsActive.ExpectedValue = "True"
    UT000009_ScalarValue_IsActive.Name = "UT000009_ScalarValue_IsActive"
    UT000009_ScalarValue_IsActive.NullExpected = False
    UT000009_ScalarValue_IsActive.ResultSet = 1
    UT000009_ScalarValue_IsActive.RowNumber = 1
    '
    'UT000010_TestAction
    '
    UT000010_TestAction.Conditions.Add(UT000010_RowCount)
    resources.ApplyResources(UT000010_TestAction, "UT000010_TestAction")
    '
    'UT000010_RowCount
    '
    UT000010_RowCount.Enabled = True
    UT000010_RowCount.Name = "UT000010_RowCount"
    UT000010_RowCount.ResultSet = 1
    UT000010_RowCount.RowCount = 4
    '
    'UT000006Data
    '
    Me.UT000006Data.PosttestAction = Nothing
    Me.UT000006Data.PretestAction = Nothing
    Me.UT000006Data.TestAction = UT000006_TestAction
    '
    'UT000007Data
    '
    Me.UT000007Data.PosttestAction = Nothing
    Me.UT000007Data.PretestAction = Nothing
    Me.UT000007Data.TestAction = UT000007_TestAction
    '
    'UT000008Data
    '
    Me.UT000008Data.PosttestAction = Nothing
    Me.UT000008Data.PretestAction = Nothing
    Me.UT000008Data.TestAction = UT000008_TestAction
    '
    'UT000009Data
    '
    Me.UT000009Data.PosttestAction = Nothing
    Me.UT000009Data.PretestAction = Nothing
    Me.UT000009Data.TestAction = UT000009_TestAction
    '
    'UT000010Data
    '
    Me.UT000010Data.PosttestAction = Nothing
    Me.UT000010Data.PretestAction = Nothing
    Me.UT000010Data.TestAction = UT000010_TestAction
  End Sub

#End Region

#Region "Additional test attributes"
  '
  ' You can use the following additional attributes as you write your tests:
  '
  ' Use ClassInitialize to run code before running the first test in the class
  ' <ClassInitialize()> Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
  ' End Sub
  '
  ' Use ClassCleanup to run code after all tests in a class have run
  ' <ClassCleanup()> Public Shared Sub MyClassCleanup()
  ' End Sub
  '
#End Region

  Private UT000006Data As DatabaseTestActions
  Private UT000007Data As DatabaseTestActions
  Private UT000008Data As DatabaseTestActions
  Private UT000009Data As DatabaseTestActions
  Private UT000010Data As DatabaseTestActions
End Class

